﻿// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Notes.SqliteRepository;

#nullable disable

namespace Notes.SqliteRepository.Migrations
{
    [DbContext(typeof(DataContext))]
    partial class DataContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder.HasAnnotation("ProductVersion", "7.0.0");

            modelBuilder.Entity("Notes.Model.Memo", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

                    b.Property<string>("Body")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<bool>("Favorite")
                        .HasColumnType("INTEGER");

                    b.Property<string>("Header")
                        .IsRequired()
                        .HasColumnType("TEXT");

                    b.Property<DateTime>("InsertedDate")
                        .HasColumnType("TEXT");

                    b.Property<DateTime?>("RemovedDate")
                        .HasColumnType("TEXT");

                    b.Property<DateTime?>("UpdatedDate")
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("Memos");
                });

            modelBuilder.Entity("Notes.Model.Memo", b =>
                {
                    b.OwnsOne("Notes.Model.TextProperties", "BodyProperties", b1 =>
                        {
                            b1.Property<int>("MemoId")
                                .HasColumnType("INTEGER");

                            b1.Property<bool>("ReadOnly")
                                .HasColumnType("INTEGER");

                            b1.Property<bool>("Wrapping")
                                .HasColumnType("INTEGER");

                            b1.HasKey("MemoId");

                            b1.ToTable("Memos");

                            b1.WithOwner()
                                .HasForeignKey("MemoId");
                        });

                    b.Navigation("BodyProperties")
                        .IsRequired();
                });
#pragma warning restore 612, 618
        }
    }
}
